package gui;

import java.awt.Color;
import java.awt.Rectangle;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JButton;

public class ExitFrame extends JFrame{
	private JPanel ExitF = null;
	private JLabel jLabelQ = null;
	private JButton jButtonYes = null;
	private JButton jButtonNo = null;
	
	
	
	public ExitFrame() {
		super();
		initialize();
	}

	/**
	 * This method initializes AcademicFrame 
	 */
	private void initialize() {
		this.setSize(300, 200);
		this.setContentPane(ExitForm());
		this.setTitle("EXIT");			
	}

	private JPanel ExitForm() {
		if (ExitF == null) {
			jLabelQ = new JLabel();
			jLabelQ.setBounds(new Rectangle(31, 7, 216, 60));
			jLabelQ.setText("ARE YOU SURE YOU WANT TO QUIT?");
			ExitF = new JPanel();
			ExitF.setLayout(null);

			ExitF.add(jLabelQ, null);
			ExitF.add(getJButtonYes(), null);
			ExitF.add(getJButtonNo(), null);
			 


		}
		return ExitF; 
	}

	/**
	 * This method initializes jButtonYes	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonYes() {
		if (jButtonYes == null) {
			jButtonYes = new JButton();
			jButtonYes.setBounds(new Rectangle(44, 90, 77, 49));
			jButtonYes.setText("Yes");
			jButtonYes.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					System.exit(0);
				}
			});
		}
		return jButtonYes;
	}

	/**
	 * This method initializes jButtonNo	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonNo() {
		if (jButtonNo == null) {
			jButtonNo = new JButton();
			jButtonNo.setBounds(new Rectangle(163, 90, 75, 48));
			jButtonNo.setText("No");
			jButtonNo.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					ExitFrame.this.dispose();
				}
			});
		}
		return jButtonNo;
	}
	
}
